summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_tests.gypi
diff options
context:
space:
mode:
authornick <nick@chromium.org>2015-08-12 17:04:02 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-13 00:04:43 +0000
commit8c3895b7d1343989606e29cffca8a82f1f3f4ec6 (patch)
treed2fea2333d999ae30c921ef4065a1aa32f5ac7d9 /chrome/chrome_tests.gypi
parent01780b3cebecf652aa7d7cf41c781ba77d73aff8 (diff)
downloadchromium_src-8c3895b7d1343989606e29cffca8a82f1f3f4ec6.zip
chromium_src-8c3895b7d1343989606e29cffca8a82f1f3f4ec6.tar.gz
chromium_src-8c3895b7d1343989606e29cffca8a82f1f3f4ec6.tar.bz2
[Re-land of https://codereview.chromium.org/126492300]
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 CQ_INCLUDE_TRYBOTS=tryserver.chromium.mac:mac_chromium_10.6_rel_ng;tryserver.chromium.win:win_chromium_vista_rel_ng TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1264923002 Cr-Commit-Position: refs/heads/master@{#342447} Review URL: https://codereview.chromium.org/1288433002 Cr-Commit-Position: refs/heads/master@{#343132}
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 ec0d930..39c28d6 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',