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

Side by Side Diff: extensions/test/data/web_view/apitest/inject_hidden_test.js

Issue 615623002: Porting more tests to app_shell_browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 window.addEventListener('message', function(e) { 5 window.addEventListener('message', function(e) {
6 var response = ''; 6 var response = '';
7 var data = JSON.parse(e.data); 7 var data = JSON.parse(e.data);
8 8
9 if (data[0] == 'visibilityState-request') { 9 if (data[0] == 'visibilityState-request') {
10 response = document.visibilityState; 10 response = document.visibilityState;
11 } else { 11 } else {
12 response = 'FAILED'; 12 response = 'FAILED';
13 } 13 }
14 14
15 e.source.postMessage( 15 e.source.postMessage(
16 JSON.stringify(['visibilityState-response', response]), '*'); 16 JSON.stringify(['visibilityState-response', response]), '*');
17 }); 17 });
OLDNEW
« no previous file with comments | « extensions/test/data/web_view/apitest/guest_with_inline_script.html ('k') | extensions/test/data/web_view/apitest/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698