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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/edit_commands/guest.html

Issue 24244004: <webview>: Reduce test flake. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/platform_apps/web_view/edit_commands/guest.html
diff --git a/chrome/test/data/extensions/platform_apps/web_view/edit_commands/guest.html b/chrome/test/data/extensions/platform_apps/web_view/edit_commands/guest.html
deleted file mode 100644
index 151985ebac585ae71ce417bb7d64dfc6b6a31f07..0000000000000000000000000000000000000000
--- a/chrome/test/data/extensions/platform_apps/web_view/edit_commands/guest.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--
- * Copyright 2013 The Chromium Authors. All rights reserved. Use of this
- * source code is governed by a BSD-style license that can be found in the
- * LICENSE file.
--->
-<html>
- <head>
- <script type="text/javascript">
- // A guest that monitors focus and edit commands.
- // Notifies the embedder about changes in focus via postMessage.
- // Note that the embedder has to initiate a postMessage first so that
- // the guest has a reference to the embedder's window.
-
- // The window reference of the embedder to send post message reply.
- var embedderWindowChannel = null;
- var embedderTestName = '';
-
- var notifyEmbedder = function(msg_array) {
- embedderWindowChannel.postMessage(JSON.stringify(msg_array), '*');
- };
-
- var onPostMessageReceived = function(e) {
- embedderWindowChannel = e.source;
- var data = JSON.parse(e.data);
- if (data[0] == 'create-channel') {
- embedderTestName = data[1];
- notifyEmbedder(['channel-created']);
- return;
- }
- if (data[0] == 'select-all') {
- var range = document.createRange();
- range.selectNode(document.body);
- window.getSelection().addRange(range);
- notifyEmbedder(['selected-all']);
- }
- };
- window.addEventListener('message', onPostMessageReceived, false);
-
- window.addEventListener('focus', function(e) {
- notifyEmbedder(['focused', embedderTestName]);
- });
-
- window.addEventListener('blur', function(e) {
- notifyEmbedder(['blurred', embedderTestName]);
- });
-
- window.addEventListener('copy', function(e) {
- notifyEmbedder(['copy', embedderTestName]);
- });
-
- </script>
- </head>
- <body>
- <div>This is a guest that monitors focus.</div>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698