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

Side by Side Diff: chrome/test/data/extensions/api_test/popup_api/toolband.html

Issue 385061: experimental.popup support for tab-content-viewed extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 xmlns="http://www.w3.org/1999/xhtml">
2 <head>
1 <script> 3 <script>
2
3 var globalValue = "I am not 42."; 4 var globalValue = "I am not 42.";
4 5
5 window.onload = function() { 6 window.onload = function() {
6 chrome.test.runTests([ 7 chrome.test.runTests([
7 function show() { 8 function show() {
8 var showDetails = { 9 var showDetails = {
9 "relativeTo": document.getElementById("anchorHere") 10 "relativeTo": document.getElementById("anchorHere")
10 }; 11 };
11 chrome.experimental.popup.show("toolband_popup.html", 12 chrome.experimental.popup.show("toolband_popup.html",
12 showDetails, 13 showDetails,
(...skipping 22 matching lines...) Expand all
35 chrome.test.assertTrue(popupView.manipulateHost != undefined, 36 chrome.test.assertTrue(popupView.manipulateHost != undefined,
36 "Unable to access popup contents."); 37 "Unable to access popup contents.");
37 38
38 popupView.manipulateHost(); 39 popupView.manipulateHost();
39 chrome.test.assertEq(42, globalValue); 40 chrome.test.assertEq(42, globalValue);
40 chrome.test.succeed(); 41 chrome.test.succeed();
41 }, 42 },
42 43
43 function closePopup() { 44 function closePopup() {
44 chrome.test.listenOnce(chrome.experimental.popup.onClosed, function(){ 45 chrome.test.listenOnce(chrome.experimental.popup.onClosed, function(){
45 chrome.test.assertTrue( 46 // TODO(twiz): getPopupView() should return undefined, but, due to
46 chrome.experimental.extension.getPopupView() == undefined); 47 // shut-down races, it is sometimes still defined. See BUG
48 //chrome.test.assertTrue(
49 // chrome.experimental.extension.getPopupView() == undefined);
47 }); 50 });
48 chrome.experimental.extension.getPopupView().close(); 51 chrome.experimental.extension.getPopupView().close();
49 } 52 }
50 ]); 53 ]);
51 } 54 }
52 </script> 55 </script>
56 </head>
53 <body> 57 <body>
54 <div> 58 <div>
55 <span id="anchorHere">TEST</span> 59 <span id="anchorHere">TEST</span>
56 </div> 60 </div>
57 </body> 61 </body>
62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698