Process --map-origin and --map-url flags regardless of the platform.

Fixes #349.

R=qsr@chromium.org

Review URL: https://codereview.chromium.org/1250423007 .

Cr-Mirrored-From: https://github.com/domokit/mojo
Cr-Mirrored-Commit: 585c64fd9092d0e8d843c817eb23f36632de5252
diff --git a/devtoolslib/shell_arguments.py b/devtoolslib/shell_arguments.py
index 7b61194..55c22eb 100644
--- a/devtoolslib/shell_arguments.py
+++ b/devtoolslib/shell_arguments.py
@@ -64,7 +64,7 @@
   return src + '=' + dest
 
 
-def _apply_appings(shell, original_arguments, map_urls, map_origins):
+def _apply_mappings(shell, original_arguments, map_urls, map_origins):
   """Applies mappings for specified urls and origins. For each local path
   specified as destination a local server will be spawned and the mapping will
   be rewritten accordingly.
@@ -255,9 +255,6 @@
       raise ShellConfigurationException('Device check failed: ' + error)
     if config_args.shell_path:
       shell.InstallApk(config_args.shell_path)
-
-    shell_args = _apply_appings(shell, shell_args, config_args.map_url,
-                                config_args.map_origin)
   else:
     if not config_args.shell_path:
       raise ShellConfigurationException('Can not run without a shell binary. '
@@ -266,6 +263,9 @@
     if config_args.use_osmesa:
       shell_args.append('--args-for=mojo:native_viewport_service --use-osmesa')
 
+  shell_args = _apply_mappings(shell, shell_args, config_args.map_url,
+                               config_args.map_origin)
+
   if config_args.origin:
     if _is_web_url(config_args.origin):
       shell_args.append('--origin=' + config_args.origin)