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

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

Issue 3549006: Top level navigations are not sent to the host browser in the ChromeFrame NPA... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
OLDNEW
1 <html> 1 <html>
2 <head><title>src property test</title> 2 <head><title>src property test</title>
3 <script type="text/javascript" src="chrome_frame_tester_helpers.js"> 3 <script type="text/javascript" src="chrome_frame_tester_helpers.js">
4 </script> 4 </script>
5 <script type="text/javascript"> 5 <script type="text/javascript">
6 function OnNavigationFailed() { 6 function OnNavigationFailed() {
7 onFailure("ChromeFrame_SrcTest", 1, "ChromeFrame Navigation failed"); 7 onFailure("ChromeFrame_SrcTest", 1, "ChromeFrame Navigation failed");
8 } 8 }
9 9
10 var load_count = 2; 10 function OnChromeFrameLoaded(url) {
11 url = url.data;
11 12
12 function OnChromeFrameLoaded(url) { 13 var chromeFrame = GetChromeFrame();
13 try { 14 var frame_url = chromeFrame.src;
14 url = url.data; 15
15 16 appendStatus("Loaded URL: " + url + " Frame url: " + frame_url);
16 var chromeFrame = GetChromeFrame();
17 var frame_url = chromeFrame.src;
18
19 appendStatus("Loaded URL: " + url + " Frame url: " + frame_url);
20 load_count--;
21
22 if (load_count) {
23 // For the first load, the URLs should match.
24 if (frame_url != url) {
25 onFailure("SrcProperty", 1, "Url: " + url);
26 }
27 } else {
28 // Previous versions changed the frame URL when internal navigation
29 // was performed. This does not match how iframes behave, and so we
30 // report success only in the case that they continue to match, even
31 // though the "internal" URL is different (and not visible) to the
32 // external host.
33 if (frame_url == url) {
34 onFailure("SrcProperty", 1, "Url: " + url);
35 } else {
36 onSuccess("SrcProperty", 1);
37 }
38 }
39 } catch (e) {
40 onFailure("SrcProperty", 1, "OnChromeFrameLoaded: " + e.description);
41 }
42 } 17 }
43 18
44 function GetChromeFrame() { 19 function GetChromeFrame() {
45 return window.document.ChromeFrame; 20 return window.document.ChromeFrame;
46 } 21 }
22
47 </script> 23 </script>
48 </head> 24 </head>
49 <body> 25 <body>
50 <div id="statusPanel" style="border: 1px solid red; width: 100%"> 26 <div id="statusPanel" style="border: 1px solid red; width: 100%">
51 Test running.... 27 Test running....
52 </div> 28 </div>
53 29
54 <object id="ChromeFrame" width="500" height="500" 30 <object id="ChromeFrame" width="500" height="500"
55 codebase="http://www.google.com" 31 codebase="http://www.google.com"
56 classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> 32 classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A">
57 <param name="src" value="src_property_frame1.html"> 33 <param name="src" value="src_property_frame1.html">
58 <param name="onload" value="return OnChromeFrameLoaded(arguments[0]);" > 34 <param name="onload" value="return OnChromeFrameLoaded(arguments[0]);" >
59 <param name="onloaderror" value="return OnNavigationFailed(arguments[0 ]);"> 35 <param name="onloaderror" value="return OnNavigationFailed(arguments[0 ]);">
60 <embed id="ChromeFramePlugin" width="500" height="500" name="ChromeFra me" 36 <embed id="ChromeFramePlugin" width="500" height="500" name="ChromeFra me"
61 src="src_property_frame1.html" 37 src="src_property_frame1.html"
62 type="application/chromeframe" 38 type="application/chromeframe"
63 onload="return OnChromeFrameLoaded(arguments[0]);" 39 onload="return OnChromeFrameLoaded(arguments[0]);"
64 onloaderror="return OnNavigationFailed(arguments[0]);"> 40 onloaderror="return OnNavigationFailed(arguments[0]);">
65 </embed> 41 </embed>
66 </object> 42 </object>
67 <p>Tests ChromeFrame Navigation</p> 43 <p>Tests ChromeFrame Navigation</p>
68 </body> 44 </body>
69 </html> 45 </html>
OLDNEW
« no previous file with comments | « chrome_frame/test/data/src_property_frame2.html ('k') | chrome_frame/test/proxy_factory_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698