diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-10 18:40:23 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-10 18:40:23 +0000 |
commit | 985615bf7a4d53360ef03c251f00ea43bdce4773 (patch) | |
tree | 9e0399e48eb7f152156acd99466f39051de0acd9 /chrome_frame | |
parent | 6e4d0255f783626a07c2f36aeb239f52a93921b3 (diff) | |
download | chromium_src-985615bf7a4d53360ef03c251f00ea43bdce4773.zip chromium_src-985615bf7a4d53360ef03c251f00ea43bdce4773.tar.gz chromium_src-985615bf7a4d53360ef03c251f00ea43bdce4773.tar.bz2 |
Add more diagnostics to the SrcProperty test.
TEST=none
BUG=none
TBR=slightlyoff
Review URL: http://codereview.chromium.org/1997012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/data/src_property_host.html | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/chrome_frame/test/data/src_property_host.html b/chrome_frame/test/data/src_property_host.html index 7b7b358..b17dd1b 100644 --- a/chrome_frame/test/data/src_property_host.html +++ b/chrome_frame/test/data/src_property_host.html @@ -7,33 +7,37 @@ onFailure("ChromeFrame_SrcTest", 1, "ChromeFrame Navigation failed"); } - var load_count = 2; - + var load_count = 2;
+
function OnChromeFrameLoaded(url) { - url = url.data; + try { + url = url.data; - var chromeFrame = GetChromeFrame(); - var frame_url = chromeFrame.src; - - appendStatus("Loaded URL: " + url + " Frame url: " + frame_url); - load_count--; + var chromeFrame = GetChromeFrame(); + var frame_url = chromeFrame.src; + + appendStatus("Loaded URL: " + url + " Frame url: " + frame_url); + load_count--; - if (load_count) { - // For the first load, the URLs should match. - if (frame_url != url) { - onFailure("SrcProperty", 1, "Url: " + url); - } - } else { - // Previous versions changed the frame URL when internal navigation - // was performed. This does not match how iframes behave, and so we - // report success only in the case that they continue to match, even - // though the "internal" URL is different (and not visible) to the - // external host. - if (frame_url == url) { - onFailure("SrcProperty", 1, "Url: " + url); + if (load_count) { + // For the first load, the URLs should match. + if (frame_url != url) { + onFailure("SrcProperty", 1, "Url: " + url); + } } else { - onSuccess("SrcProperty", 1); - } + // Previous versions changed the frame URL when internal navigation + // was performed. This does not match how iframes behave, and so we + // report success only in the case that they continue to match, even + // though the "internal" URL is different (and not visible) to the + // external host. + if (frame_url == url) { + onFailure("SrcProperty", 1, "Url: " + url); + } else { + onSuccess("SrcProperty", 1); + } + }
+ } catch (e) {
+ onFailure("SrcProperty", 1, "OnChromeFrameLoaded: " + e.description);
} } |