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

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

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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var messages = [];
6
7 function messageReceived(data) {
8 messages.push(data);
9 }
10
11 function evaluateMessages() {
12 if (messages.length != 3)
13 chrome.test.notifyFail("Got " + messages.length + " messages instead of 3");
14 else if (messages[0] != "no restriction" ||
15 messages[1] != "http://a.com/" ||
16 messages[2] != "last message")
17 chrome.test.notifyFail("Got wrong messages: " + messages[0] + ", " +
18 messages[1] + ", " + messages[2]);
19 else
20 chrome.test.notifyPass();
21 }
22
23
24 chrome.test.onMessage.addListener(function (info) {
25 messageReceived(info.data);
26 if (info.lastMessage)
27 evaluateMessages();
28 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698