summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_tests.gypi
diff options
context:
space:
mode:
authornick <nick@chromium.org>2015-08-07 14:49:27 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-07 21:50:12 +0000
commit02292e994c9ec62deecec3bec2132500ca68a5de (patch)
treedf1239396190a74caa08a1d058370888a5e05026 /chrome/chrome_tests.gypi
parentc92563ca92821001f4bafb37dffc10d41c46930f (diff)
downloadchromium_src-02292e994c9ec62deecec3bec2132500ca68a5de.zip
chromium_src-02292e994c9ec62deecec3bec2132500ca68a5de.tar.gz
chromium_src-02292e994c9ec62deecec3bec2132500ca68a5de.tar.bz2
Introduce cross_site_iframe_factory.html, and use it to test
the site isolation code in MemoryMetricsDetails under chrome/. [ See crbug.com/515672 for a screenshot ] /cross_site_iframe_factory.html?a(b(c, d)) gives you a simple three-level, four-site iframe test. The trick it uses, is that the query parameter is parsed and passed recursively to children, so the first level is: <iframe src="b.com:1234/cross_site_iframe_factory.html?b(c(),d())"> Which then contains the two leaf iframes: <iframe src="c.com:1234/cross_site_iframe_factory.html?c()"> <iframe src="d.com:1234/cross_site_iframe_factory.html?d()"> To to cut down on noise. ".com" is automatically affixed to the hostname if a TLD isn't present. As a convenience, the page supports local preview if loaded via file:// URI. file:// URIs are technically cross-origin, although --site-per-process doesn't isolate them today. Each site has a random (but consistent) background color as a visual aid. The page contains some crude layout logic to make sure the outer levels are big enough to fit the inner levels. The parsing logic is in tree_parser_util.js, which has unittests. MetricsMemoryDetailsBrowserTest.TestSiteIsolation is a new test that uses the above facility to creates a bunch of complex iframe cases, and tests that our process-counting UMA stats are as expected. BUG=515672 Review URL: https://codereview.chromium.org/1264923002 Cr-Commit-Position: refs/heads/master@{#342447}
Diffstat (limited to 'chrome/chrome_tests.gypi')
-rw-r--r--chrome/chrome_tests.gypi1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 481c3c7..153c8ee2 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -400,6 +400,7 @@
'browser/sessions/session_restore_browsertest.cc',
'browser/sessions/session_restore_browsertest_chromeos.cc',
'browser/sessions/tab_restore_browsertest.cc',
+ 'browser/site_details_browsertest.cc',
'browser/spellchecker/spellcheck_service_browsertest.cc',
'browser/ssl/captive_portal_blocking_page_browsertest.cc',
'browser/ssl/certificate_reporting_test_utils.cc',