WebUI: Use relative paths where possible in shared UI elements, part 1.

This not only results to smaller file size, but also makes the code more
portable, since it is less dependent on chrome:// URLs, and can eventually
lead to running those elements and tests outside the context of a browser_tests
and without js2gtest.

For example this makes it easier to keep maintaining the following WebUI demo
https://freshp86.github.io/chromium-webui/demo.html, and potentially move it within
the Chromium repo itself.

Bug: 866236
Change-Id: I1459789177ba5ede252c3ade3e0952686f4f01b5
Reviewed-on: https://chromium-review.googlesource.com/1144610
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578132}
diff --git a/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_camera.html b/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_camera.html
index fbe37a20..654b13c 100644
--- a/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_camera.html
+++ b/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_camera.html
@@ -1,6 +1,6 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
+<link rel="import" href="../../shared_style_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner-lite.html">
 <link rel="import" href="cr_png_behavior.html">
diff --git a/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_list.html b/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_list.html
index 2c8eb21..65965809 100644
--- a/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_list.html
+++ b/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_list.html
@@ -1,7 +1,7 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/icons.html">
-<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
+<link rel="import" href="../../icons.html">
+<link rel="import" href="../../shared_style_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-keys/iron-a11y-keys.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-selector.html">
diff --git a/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_pane.html b/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_pane.html
index f0549d0b..0563c0f0 100644
--- a/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_pane.html
+++ b/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_pane.html
@@ -1,6 +1,6 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
+<link rel="import" href="../../shared_style_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
 <link rel="import" href="cr_camera.html">
 <link rel="import" href="cr_picture_types.html">
diff --git a/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_png_behavior.html b/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_png_behavior.html
index 4d7582e..141b0f2 100644
--- a/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_png_behavior.html
+++ b/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_png_behavior.html
@@ -1,2 +1,2 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../../html/polymer.html">
 <script src="cr_png_behavior.js"></script>
diff --git a/ui/webui/resources/cr_elements/chromeos/network/cr_network_icon.html b/ui/webui/resources/cr_elements/chromeos/network/cr_network_icon.html
index 056645f..0a55a398 100644
--- a/ui/webui/resources/cr_elements/chromeos/network/cr_network_icon.html
+++ b/ui/webui/resources/cr_elements/chromeos/network/cr_network_icon.html
@@ -1,8 +1,9 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../../html/polymer.html">
+
+<link rel="import" href="../../chromeos/network/cr_onc_types.html">
+<link rel="import" href="../../chromeos/network/network_icons.html">
+<link rel="import" href="../../hidden_style_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
-<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_onc_types.html">
-<link rel="import" href="chrome://resources/cr_elements/chromeos/network/network_icons.html">
-<link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
 
 <dom-module id="cr-network-icon">
   <template>
diff --git a/ui/webui/resources/cr_elements/chromeos/network/cr_network_list.html b/ui/webui/resources/cr_elements/chromeos/network/cr_network_list.html
index 855875a..7a16782 100644
--- a/ui/webui/resources/cr_elements/chromeos/network/cr_network_list.html
+++ b/ui/webui/resources/cr_elements/chromeos/network/cr_network_list.html
@@ -1,9 +1,10 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
-<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_network_list_item.html">
-<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_onc_types.html">
-<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_onc_types.html">
-<link rel="import" href="chrome://resources/cr_elements/cr_scrollable_behavior.html">
-<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
+<link rel="import" href="../../../html/polymer.html">
+
+<link rel="import" href="../../chromeos/network/cr_network_list_item.html">
+<link rel="import" href="../../chromeos/network/cr_onc_types.html">
+<link rel="import" href="../../chromeos/network/cr_onc_types.html">
+<link rel="import" href="../../cr_scrollable_behavior.html">
+<link rel="import" href="../../shared_style_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html">
 
diff --git a/ui/webui/resources/cr_elements/chromeos/network/cr_network_list_item.html b/ui/webui/resources/cr_elements/chromeos/network/cr_network_list_item.html
index 4a9bbe3..7580886 100644
--- a/ui/webui/resources/cr_elements/chromeos/network/cr_network_list_item.html
+++ b/ui/webui/resources/cr_elements/chromeos/network/cr_network_list_item.html
@@ -1,12 +1,12 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_network_icon.html">
-<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_onc_types.html">
-<link rel="import" href="chrome://resources/cr_elements/icons.html">
-<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_indicator.html">
-<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network_behavior.html">
-<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
-<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
+<link rel="import" href="../../chromeos/network/cr_network_icon.html">
+<link rel="import" href="../../chromeos/network/cr_onc_types.html">
+<link rel="import" href="../../icons.html">
+<link rel="import" href="../../policy/cr_policy_indicator.html">
+<link rel="import" href="../../policy/cr_policy_network_behavior.html">
+<link rel="import" href="../../shared_style_css.html">
+<link rel="import" href="../../shared_vars_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-keys/iron-a11y-keys.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
diff --git a/ui/webui/resources/cr_elements/chromeos/network/cr_network_select.html b/ui/webui/resources/cr_elements/chromeos/network/cr_network_select.html
index def03d7..a190e85 100644
--- a/ui/webui/resources/cr_elements/chromeos/network/cr_network_select.html
+++ b/ui/webui/resources/cr_elements/chromeos/network/cr_network_select.html
@@ -1,6 +1,7 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
-<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_network_list.html">
-<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_onc_types.html">
+<link rel="import" href="../../../html/polymer.html">
+
+<link rel="import" href="../../chromeos/network/cr_network_list.html">
+<link rel="import" href="../../chromeos/network/cr_onc_types.html">
 
 <dom-module id="cr-network-select">
   <template>
diff --git a/ui/webui/resources/cr_elements/chromeos/network/network_icons.html b/ui/webui/resources/cr_elements/chromeos/network/network_icons.html
index f7633f0..df5f47c 100644
--- a/ui/webui/resources/cr_elements/chromeos/network/network_icons.html
+++ b/ui/webui/resources/cr_elements/chromeos/network/network_icons.html
@@ -1,4 +1,5 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../../html/polymer.html">
+
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-iconset-svg/iron-iconset-svg.html">
 
 <!-- These icons were converted from source .svg files. -->
diff --git a/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.html b/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.html
index 1a959d70..3bb931d9a 100644
--- a/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.html
+++ b/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.html
@@ -1,9 +1,9 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/html/assert.html">
-<link rel="import" href="chrome://resources/html/cr/ui/focus_without_ink.html">
-<link rel="import" href="chrome://resources/html/util.html">
-<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
+<link rel="import" href="../../html/assert.html">
+<link rel="import" href="../../html/cr/ui/focus_without_ink.html">
+<link rel="import" href="../../html/util.html">
+<link rel="import" href="../shared_vars_css.html">
 
 <dom-module id="cr-action-menu">
   <template>
diff --git a/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html b/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html
index c3a75d69..64e279b4 100644
--- a/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html
+++ b/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html
@@ -1,4 +1,4 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-behaviors/paper-ripple-behavior.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
diff --git a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html
index 65fadd0..d9dcfac 100644
--- a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html
+++ b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html
@@ -1,9 +1,9 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
-<link rel="import" href="chrome://resources/cr_elements/cr_icons_css.html">
-<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
-<link rel="import" href="chrome://resources/html/assert.html">
+<link rel="import" href="../hidden_style_css.html">
+<link rel="import" href="../cr_icons_css.html">
+<link rel="import" href="../shared_vars_css.html">
+<link rel="import" href="../../html/assert.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
 
 <dom-module id="cr-dialog">
diff --git a/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.html b/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.html
index b143e8cd..a904f7f 100644
--- a/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.html
+++ b/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.html
@@ -1,6 +1,6 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
+<link rel="import" href="../shared_vars_css.html">
 
 <dom-module id="cr-drawer">
   <template>
diff --git a/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html b/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html
index eee1f57..a0166be6 100644
--- a/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html
+++ b/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html
@@ -1,6 +1,7 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
-<link rel="import" href="chrome://resources/cr_elements/cr_icons_css.html">
-<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
+<link rel="import" href="../../html/polymer.html">
+
+<link rel="import" href="../cr_icons_css.html">
+<link rel="import" href="../shared_style_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
 
 <dom-module id="cr-expand-button">
diff --git a/ui/webui/resources/cr_elements/cr_icons_css.html b/ui/webui/resources/cr_elements/cr_icons_css.html
index a170851..6c346a3 100644
--- a/ui/webui/resources/cr_elements/cr_icons_css.html
+++ b/ui/webui/resources/cr_elements/cr_icons_css.html
@@ -1,4 +1,4 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../html/polymer.html">
 
 <!-- Common icon classes for Material Design WebUI. -->
 <dom-module id="cr-icons">
diff --git a/ui/webui/resources/cr_elements/cr_input/cr_input.html b/ui/webui/resources/cr_elements/cr_input/cr_input.html
index 6002d1f..6f88b1ec 100644
--- a/ui/webui/resources/cr_elements/cr_input/cr_input.html
+++ b/ui/webui/resources/cr_elements/cr_input/cr_input.html
@@ -1,6 +1,6 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/html/assert.html">
+<link rel="import" href="../../html/assert.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
 <link rel="import" href="../hidden_style_css.html">
 <link rel="import" href="../shared_vars_css.html">
diff --git a/ui/webui/resources/cr_elements/cr_input/cr_input_style_css.html b/ui/webui/resources/cr_elements/cr_input/cr_input_style_css.html
index a8b26e1..2b3e104 100644
--- a/ui/webui/resources/cr_elements/cr_input/cr_input_style_css.html
+++ b/ui/webui/resources/cr_elements/cr_input/cr_input_style_css.html
@@ -1,4 +1,4 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
 <link rel="import" href="../shared_vars_css.html">
diff --git a/ui/webui/resources/cr_elements/cr_lazy_render/cr_lazy_render.html b/ui/webui/resources/cr_elements/cr_lazy_render/cr_lazy_render.html
index be956c7..eab1f83 100644
--- a/ui/webui/resources/cr_elements/cr_lazy_render/cr_lazy_render.html
+++ b/ui/webui/resources/cr_elements/cr_lazy_render/cr_lazy_render.html
@@ -1,4 +1,4 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
 <dom-module id="cr-lazy-render">
   <template>
diff --git a/ui/webui/resources/cr_elements/cr_link_row/cr_link_row.html b/ui/webui/resources/cr_elements/cr_link_row/cr_link_row.html
index 8ae3c5d..2b12b55 100644
--- a/ui/webui/resources/cr_elements/cr_link_row/cr_link_row.html
+++ b/ui/webui/resources/cr_elements/cr_link_row/cr_link_row.html
@@ -1,8 +1,8 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/cr_icons_css.html">
-<link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
-<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
+<link rel="import" href="../cr_icons_css.html">
+<link rel="import" href="../hidden_style_css.html">
+<link rel="import" href="../shared_vars_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-behaviors/paper-ripple-behavior.html">
 
diff --git a/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.html b/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.html
index d4d7540..a28dad40 100644
--- a/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.html
+++ b/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.html
@@ -1,7 +1,7 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
-<link rel="import" href="chrome://resources/html/icon.html">
+<link rel="import" href="../shared_vars_css.html">
+<link rel="import" href="../../html/icon.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
 <link rel="import" href="cr_profile_avatar_selector_grid.html">
diff --git a/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.html b/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.html
index 94a90d2..8c590b0 100644
--- a/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.html
+++ b/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.html
@@ -1,7 +1,7 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/html/assert.html">
-<link rel="import" href="chrome://resources/html/util.html">
+<link rel="import" href="../../html/assert.html">
+<link rel="import" href="../../html/util.html">
 
 <dom-module id="cr-profile-avatar-selector-grid">
   <template>
diff --git a/ui/webui/resources/cr_elements/cr_radio_button/cr_radio_button.html b/ui/webui/resources/cr_elements/cr_radio_button/cr_radio_button.html
index 492af7c..12f6081 100644
--- a/ui/webui/resources/cr_elements/cr_radio_button/cr_radio_button.html
+++ b/ui/webui/resources/cr_elements/cr_radio_button/cr_radio_button.html
@@ -1,4 +1,4 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
 <link rel="import" href="../hidden_style_css.html">
diff --git a/ui/webui/resources/cr_elements/cr_radio_button/cr_radio_button_style_css.html b/ui/webui/resources/cr_elements/cr_radio_button/cr_radio_button_style_css.html
index c75f207..3da38f4 100644
--- a/ui/webui/resources/cr_elements/cr_radio_button/cr_radio_button_style_css.html
+++ b/ui/webui/resources/cr_elements/cr_radio_button/cr_radio_button_style_css.html
@@ -1,4 +1,4 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
 <link rel="import" href="../shared_vars_css.html">
diff --git a/ui/webui/resources/cr_elements/cr_scrollable_behavior.html b/ui/webui/resources/cr_elements/cr_scrollable_behavior.html
index dd48f42..ac1ac83 100644
--- a/ui/webui/resources/cr_elements/cr_scrollable_behavior.html
+++ b/ui/webui/resources/cr_elements/cr_scrollable_behavior.html
@@ -1,3 +1,4 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../html/polymer.html">
+
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html">
 <script src="cr_scrollable_behavior.js"></script>
diff --git a/ui/webui/resources/cr_elements/cr_slider/cr_slider.html b/ui/webui/resources/cr_elements/cr_slider/cr_slider.html
index 879bb7fc..05adf45 100644
--- a/ui/webui/resources/cr_elements/cr_slider/cr_slider.html
+++ b/ui/webui/resources/cr_elements/cr_slider/cr_slider.html
@@ -1,6 +1,6 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
+<link rel="import" href="../shared_vars_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-slider/paper-slider.html">
 
 <dom-module id="cr-slider">
diff --git a/ui/webui/resources/cr_elements/cr_toast/cr_toast.html b/ui/webui/resources/cr_elements/cr_toast/cr_toast.html
index d09b9a57..0f5bcbf 100644
--- a/ui/webui/resources/cr_elements/cr_toast/cr_toast.html
+++ b/ui/webui/resources/cr_elements/cr_toast/cr_toast.html
@@ -1,4 +1,4 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
 
diff --git a/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.html b/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.html
index 6e3b8f0e4..551ff31 100644
--- a/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.html
+++ b/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.html
@@ -1,4 +1,4 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-behaviors/paper-ripple-behavior.html">
 <link rel="import" href="../shared_vars_css.html">
diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html
index ec50ca4..8fb18010 100644
--- a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html
+++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html
@@ -1,8 +1,8 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/cr_icons_css.html">
-<link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html">
-<link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
+<link rel="import" href="../cr_icons_css.html">
+<link rel="import" href="../cr_toolbar/cr_toolbar_search_field.html">
+<link rel="import" href="../hidden_style_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-media-query/iron-media-query.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
 
diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html
index 8b149e0..635bfe7 100644
--- a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html
+++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html
@@ -1,7 +1,8 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
-<link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_search_field_behavior.html">
-<link rel="import" href="chrome://resources/cr_elements/icons.html">
-<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
+<link rel="import" href="../../html/polymer.html">
+
+<link rel="import" href="../cr_search_field/cr_search_field_behavior.html">
+<link rel="import" href="../icons.html">
+<link rel="import" href="../shared_style_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner-lite.html">
diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.html b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.html
index a658e9c3..53dfb4a 100644
--- a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.html
+++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.html
@@ -1,7 +1,8 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
-<link rel="import" href="chrome://resources/cr_elements/cr_icons_css.html">
-<link rel="import" href="chrome://resources/cr_elements/icons.html">
-<link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html">
+<link rel="import" href="../../html/polymer.html">
+
+<link rel="import" href="../cr_icons_css.html">
+<link rel="import" href="../icons.html">
+<link rel="import" href="../paper_button_style_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
 
diff --git a/ui/webui/resources/cr_elements/hidden_style_css.html b/ui/webui/resources/cr_elements/hidden_style_css.html
index 4c22288..9326a5e8 100644
--- a/ui/webui/resources/cr_elements/hidden_style_css.html
+++ b/ui/webui/resources/cr_elements/hidden_style_css.html
@@ -1,4 +1,4 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../html/polymer.html">
 
 <!-- Common style for Material Design WebUI, such that the |hidden| attributes
   works within Shadow DOM. -->
diff --git a/ui/webui/resources/cr_elements/icons.html b/ui/webui/resources/cr_elements/icons.html
index 47927f9..437eb4e 100644
--- a/ui/webui/resources/cr_elements/icons.html
+++ b/ui/webui/resources/cr_elements/icons.html
@@ -1,4 +1,5 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../html/polymer.html">
+
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-iconset-svg/iron-iconset-svg.html">
 
 <!--
diff --git a/ui/webui/resources/cr_elements/paper_button_style_css.html b/ui/webui/resources/cr_elements/paper_button_style_css.html
index beec808..4d768d2 100644
--- a/ui/webui/resources/cr_elements/paper_button_style_css.html
+++ b/ui/webui/resources/cr_elements/paper_button_style_css.html
@@ -1,6 +1,6 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
+<link rel="import" href="shared_vars_css.html">
 
 <!-- Common paper-button styling for Material Design WebUI. -->
 <dom-module id="paper-button-style">
diff --git a/ui/webui/resources/cr_elements/paper_tabs_style_css.html b/ui/webui/resources/cr_elements/paper_tabs_style_css.html
index 9ce5ce1a7..ca193b60 100644
--- a/ui/webui/resources/cr_elements/paper_tabs_style_css.html
+++ b/ui/webui/resources/cr_elements/paper_tabs_style_css.html
@@ -1,6 +1,6 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
+<link rel="import" href="shared_vars_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
 
 <!-- Common paper-tabs styling for Material Design WebUI. -->
@@ -21,4 +21,4 @@
       }
     </style>
   </template>
-</dom-module>
\ No newline at end of file
+</dom-module>
diff --git a/ui/webui/resources/cr_elements/policy/cr_policy_indicator.html b/ui/webui/resources/cr_elements/policy/cr_policy_indicator.html
index 3f7e6614..105d311 100644
--- a/ui/webui/resources/cr_elements/policy/cr_policy_indicator.html
+++ b/ui/webui/resources/cr_elements/policy/cr_policy_indicator.html
@@ -1,6 +1,6 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
+<link rel="import" href="../hidden_style_css.html">
 <link rel="import" href="cr_policy_indicator_behavior.html">
 <link rel="import" href="cr_tooltip_icon.html">
 
diff --git a/ui/webui/resources/cr_elements/policy/cr_policy_network_behavior.html b/ui/webui/resources/cr_elements/policy/cr_policy_network_behavior.html
index eefd837..5f8d7fde 100644
--- a/ui/webui/resources/cr_elements/policy/cr_policy_network_behavior.html
+++ b/ui/webui/resources/cr_elements/policy/cr_policy_network_behavior.html
@@ -1,2 +1,2 @@
-<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_onc_types.html">
+<link rel="import" href="../chromeos/network/cr_onc_types.html">
 <script src="cr_policy_network_behavior.js"></script>
diff --git a/ui/webui/resources/cr_elements/policy/cr_policy_network_indicator.html b/ui/webui/resources/cr_elements/policy/cr_policy_network_indicator.html
index 61440b07..94247f5 100644
--- a/ui/webui/resources/cr_elements/policy/cr_policy_network_indicator.html
+++ b/ui/webui/resources/cr_elements/policy/cr_policy_network_indicator.html
@@ -1,6 +1,6 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
+<link rel="import" href="../hidden_style_css.html">
 <link rel="import" href="cr_policy_indicator_behavior.html">
 <link rel="import" href="cr_policy_network_behavior.html">
 <link rel="import" href="cr_tooltip_icon.html">
diff --git a/ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.html b/ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.html
index 555bb8c9..1940042 100644
--- a/ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.html
+++ b/ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.html
@@ -1,6 +1,6 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
+<link rel="import" href="../hidden_style_css.html">
 <link rel="import" href="cr_policy_indicator_behavior.html">
 <link rel="import" href="cr_tooltip_icon.html">
 
diff --git a/ui/webui/resources/cr_elements/policy/cr_tooltip_icon.html b/ui/webui/resources/cr_elements/policy/cr_tooltip_icon.html
index 5f9958ed..c080e10 100644
--- a/ui/webui/resources/cr_elements/policy/cr_tooltip_icon.html
+++ b/ui/webui/resources/cr_elements/policy/cr_tooltip_icon.html
@@ -1,7 +1,7 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../../html/polymer.html">
 
-<link rel="import" href="chrome://resources/cr_elements/icons.html">
-<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
+<link rel="import" href="../icons.html">
+<link rel="import" href="../shared_vars_css.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-tooltip/paper-tooltip.html">
 
diff --git a/ui/webui/resources/cr_elements/search_highlight_style_css.html b/ui/webui/resources/cr_elements/search_highlight_style_css.html
index 451f86d..bebb5ec 100644
--- a/ui/webui/resources/cr_elements/search_highlight_style_css.html
+++ b/ui/webui/resources/cr_elements/search_highlight_style_css.html
@@ -1,4 +1,4 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../html/polymer.html">
 
 <link rel="import" href="shared_vars_css.html">
 
diff --git a/ui/webui/resources/cr_elements/shared_style_css.html b/ui/webui/resources/cr_elements/shared_style_css.html
index 28cabeb..6b0631c 100644
--- a/ui/webui/resources/cr_elements/shared_style_css.html
+++ b/ui/webui/resources/cr_elements/shared_style_css.html
@@ -1,5 +1,6 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
-<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
+<link rel="import" href="../html/polymer.html">
+
+<link rel="import" href="shared_vars_css.html">
 <link rel="import" href="hidden_style_css.html">
 <link rel="import" href="cr_icons_css.html">
 
diff --git a/ui/webui/resources/cr_elements/shared_vars_css.html b/ui/webui/resources/cr_elements/shared_vars_css.html
index e870a4648..6a1ef0446 100644
--- a/ui/webui/resources/cr_elements/shared_vars_css.html
+++ b/ui/webui/resources/cr_elements/shared_vars_css.html
@@ -1,4 +1,4 @@
-<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="../html/polymer.html">
 
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">