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

Side by Side Diff: chrome/test/data/extensions/api_test/messaging/event_url/test.html

Issue 8763008: Move yet another block of tests to manifest_version 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 <script> 1 <!--
2 var messages = []; 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
3 3 * source code is governed by a BSD-style license that can be found in the
4 function messageReceived(data) { 4 * LICENSE file.
5 messages.push(data); 5 -->
6 } 6 <script src="test.js"></script>
7
8 function evaluateMessages() {
9 if (messages.length != 3)
10 chrome.test.notifyFail("Got " + messages.length + " messages instead of 3");
11 else if (messages[0] != "no restriction" ||
12 messages[1] != "http://a.com/" ||
13 messages[2] != "last message")
14 chrome.test.notifyFail("Got wrong messages: " + messages[0] + ", " +
15 messages[1] + ", " + messages[2]);
16 else
17 chrome.test.notifyPass();
18 }
19
20
21 chrome.test.onMessage.addListener(function (info) {
22 messageReceived(info.data);
23 if (info.lastMessage)
24 evaluateMessages();
25 });
26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698