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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/context_menus/basic/guest.js

Issue 1016033010: Fix WebViewTest.TestContextMenu on official builders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert trybot change Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/platform_apps/web_view/context_menus/basic/guest.js
diff --git a/chrome/test/data/extensions/platform_apps/web_view/context_menus/basic/guest.js b/chrome/test/data/extensions/platform_apps/web_view/context_menus/basic/guest.js
index 52f0bf1d41c18c4e092e84eb616b21eccb8814e5..bb0ffda3feb7859e6c15c56e1f0388bcacf6b6da 100644
--- a/chrome/test/data/extensions/platform_apps/web_view/context_menus/basic/guest.js
+++ b/chrome/test/data/extensions/platform_apps/web_view/context_menus/basic/guest.js
@@ -25,4 +25,22 @@ var onPostMessageReceived = function(e) {
return;
}
};
+
+var setup = function() {
+ // Make sure there is always stuff to show in context menu by
+ // inserting an <input> element.
+ // Note that we don't always show "Inspect element", so this is
+ // necessary.
+ var div = document.createElement('div');
+ div.style.position = 'absolute';
+ div.style.top = 0;
+ div.style.left = 0;
+ var input = document.createElement('input');
+ div.appendChild(input);
+ document.body.style.padding = 0;
+ document.body.style.margin = 0;
+ document.body.appendChild(div);
+};
+
+setup();
window.addEventListener('message', onPostMessageReceived, false);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698