Change mojo url to always use mojo:foo instead of mojo://foo
R=abarth@chromium.org Review URL: https://codereview.chromium.org/701933004
This commit is contained in:
parent
f536c8d62b
commit
d1c92fa424
@ -28,7 +28,7 @@ Running tests manually
|
|||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
* ``sky/tools/run_sky_httpd``
|
* ``sky/tools/run_sky_httpd``
|
||||||
* ``out/Debug/mojo_shell --args-for="mojo://native_viewport_service/ --use-headless-config" --content-handlers=text/html,mojo://sky_viewer/ --url-mappings=mojo:window_manager=mojo:sky_tester mojo:window_manager``
|
* ``out/Debug/mojo_shell --args-for="mojo:native_viewport_service --use-headless-config" --content-handlers=text/html,mojo:sky_viewer --url-mappings=mojo:window_manager=mojo:sky_tester mojo:window_manager``
|
||||||
* The ``sky_tester`` should print ``#READY`` when ready
|
* The ``sky_tester`` should print ``#READY`` when ready
|
||||||
* Type the URL you wish to run, for example ``http://127.0.0.1:8000/lowlevel/text.html``, and press the enter key
|
* Type the URL you wish to run, for example ``http://127.0.0.1:8000/lowlevel/text.html``, and press the enter key
|
||||||
* The harness should print the results of the test. You can then type another URL.
|
* The harness should print the results of the test. You can then type another URL.
|
||||||
|
@ -128,14 +128,14 @@ As an example, the following is a sketch of a module that wraps Mojo's
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
SKY MODULE
|
SKY MODULE
|
||||||
<import src=”mojo://shell” as=”shell” />
|
<import src=”mojo:shell” as=”shell” />
|
||||||
<import src="/mojo/network/network_service.mojom.sky" as="net" />
|
<import src="/mojo/network/network_service.mojom.sky" as="net" />
|
||||||
<import src="/mojo/network/url_loader.mojom.sky" as="loader" />
|
<import src="/mojo/network/url_loader.mojom.sky" as="loader" />
|
||||||
<script>
|
<script>
|
||||||
module.exports = function fetch(url) {
|
module.exports = function fetch(url) {
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
var networkService = shell.connectToService(
|
var networkService = shell.connectToService(
|
||||||
"mojo://network_service", net.NetworkService);
|
"mojo:network_service", net.NetworkService);
|
||||||
var request = new loader.URLRequest({
|
var request = new loader.URLRequest({
|
||||||
url: url, method: "GET", auto_follow_redirects: true});
|
url: url, method: "GET", auto_follow_redirects: true});
|
||||||
var urlLoader = networkService.createURLLoader();
|
var urlLoader = networkService.createURLLoader();
|
||||||
|
@ -11,7 +11,7 @@ describe('Mojo network_service', function() {
|
|||||||
|
|
||||||
it('should be able to fetch text files', function(done) {
|
it('should be able to fetch text files', function(done) {
|
||||||
var netServiceHandle = internals.connectToService(
|
var netServiceHandle = internals.connectToService(
|
||||||
"mojo://network_service/", "mojo::NetworkService");
|
"mojo:network_service", "mojo::NetworkService");
|
||||||
var netConnection = new connection.Connection(
|
var netConnection = new connection.Connection(
|
||||||
netServiceHandle,
|
netServiceHandle,
|
||||||
net.NetworkService.stubClass,
|
net.NetworkService.stubClass,
|
||||||
|
@ -67,7 +67,7 @@ class SkyDebugger(object):
|
|||||||
parser.add_argument('url', nargs='?', type=str)
|
parser.add_argument('url', nargs='?', type=str)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
content_handlers = ['%s,%s' % (mime_type, 'mojo://sky_viewer/')
|
content_handlers = ['%s,%s' % (mime_type, 'mojo:sky_viewer')
|
||||||
for mime_type in SUPPORTED_MIME_TYPES]
|
for mime_type in SUPPORTED_MIME_TYPES]
|
||||||
shell_command = [
|
shell_command = [
|
||||||
self.paths.mojo_shell_path,
|
self.paths.mojo_shell_path,
|
||||||
@ -81,10 +81,10 @@ class SkyDebugger(object):
|
|||||||
if not urlparse.urlparse(url).scheme:
|
if not urlparse.urlparse(url).scheme:
|
||||||
url = self._start_http_server_for_file(url)
|
url = self._start_http_server_for_file(url)
|
||||||
|
|
||||||
prompt_args = '--args-for=mojo://sky_debugger_prompt/ %s' % url
|
prompt_args = '--args-for=mojo:sky_debugger_prompt %s' % url
|
||||||
shell_command.append(prompt_args)
|
shell_command.append(prompt_args)
|
||||||
if args.use_osmesa:
|
if args.use_osmesa:
|
||||||
shell_command.append('--args-for=mojo://native_viewport_service/ --use-osmesa')
|
shell_command.append('--args-for=mojo:native_viewport_service --use-osmesa')
|
||||||
if args.gdb:
|
if args.gdb:
|
||||||
shell_command = ['gdb', '--args'] + shell_command
|
shell_command = ['gdb', '--args'] + shell_command
|
||||||
|
|
||||||
|
@ -71,14 +71,14 @@ class PerfHarness(object):
|
|||||||
])
|
])
|
||||||
|
|
||||||
def _sky_tester_command(self, url):
|
def _sky_tester_command(self, url):
|
||||||
content_handlers = ['%s,%s' % (mime_type, 'mojo://sky_viewer/')
|
content_handlers = ['%s,%s' % (mime_type, 'mojo:sky_viewer')
|
||||||
for mime_type in SUPPORTED_MIME_TYPES]
|
for mime_type in SUPPORTED_MIME_TYPES]
|
||||||
return [
|
return [
|
||||||
self.paths.mojo_shell_path,
|
self.paths.mojo_shell_path,
|
||||||
'--args-for=mojo://native_viewport_service/ --use-headless-config --use-osmesa',
|
'--args-for=mojo:native_viewport_service --use-headless-config --use-osmesa',
|
||||||
'--args-for=mojo://window_manager/ %s' % url,
|
'--args-for=mojo:window_manager %s' % url,
|
||||||
'--content-handlers=%s' % ','.join(content_handlers),
|
'--content-handlers=%s' % ','.join(content_handlers),
|
||||||
'--url-mappings=mojo:window_manager=mojo://sky_tester/',
|
'--url-mappings=mojo:window_manager=mojo:sky_tester',
|
||||||
'mojo:window_manager',
|
'mojo:window_manager',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user