Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(850)

Side by Side Diff: chrome_frame/test/data/src_property_host.html

Issue 218019: Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/test/data/src_property_frame2.html ('k') | chrome_frame/test/data/version.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head><title>src property test</title>
3 <script type="text/javascript" src="chrome_frame_tester_helpers.js">
4 </script>
5 <script type="text/javascript">
6 function OnNavigationFailed() {
7 onFailure("ChromeFrame_SrcTest", 1, "ChromeFrame Navigation failed");
8 }
9
10 var load_count = 2;
11
12 function OnChromeFrameLoaded(url) {
13 url = url.data;
14
15 var chromeFrame = GetChromeFrame();
16 var frame_url = chromeFrame.src;
17
18 appendStatus("Loaded URL: " + url + " Frame url: " + frame_url);
19 load_count--;
20
21 if (load_count) {
22 // For the first load, the URLs should match.
23 if (frame_url != url) {
24 onFailure("SrcProperty", 1, "Url: " + url);
25 }
26 } else {
27 // Previous versions changed the frame URL when internal navigation
28 // was performed. This does not match how iframes behave, and so we
29 // report success only in the case that they continue to match, even
30 // though the "internal" URL is different (and not visible) to the
31 // external host.
32 if (frame_url == url) {
33 onFailure("SrcProperty", 1, "Url: " + url);
34 } else {
35 onSuccess("SrcProperty", 1);
36 }
37 }
38 }
39
40 function GetChromeFrame() {
41 return window.document.ChromeFrame;
42 }
43 </script>
44 </head>
45 <body>
46 <div id="statusPanel" style="border: 1px solid red; width: 100%">
47 Test running....
48 </div>
49
50 <object id="ChromeFrame" width="500" height="500"
51 codebase="http://www.google.com"
52 classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A">
53 <param name="src" value="src_property_frame1.html">
54 <param name="onload" value="return OnChromeFrameLoaded(arguments[0]);" >
55 <param name="onloaderror" value="return OnNavigationFailed(arguments[0 ]);">
56 <embed id="ChromeFramePlugin" width="500" height="500" name="ChromeFra me"
57 src="src_property_frame1.html"
58 type="application/chromeframe"
59 onload="return OnChromeFrameLoaded(arguments[0]);"
60 onloaderror="return OnNavigationFailed(arguments[0]);">
61 </embed>
62 </object>
63 <p>Tests ChromeFrame Navigation</p>
64 </body>
65 </html>
OLDNEW
« no previous file with comments | « chrome_frame/test/data/src_property_frame2.html ('k') | chrome_frame/test/data/version.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698