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

Side by Side Diff: mojo/public/js/bindings/core_unittests.js

Issue 411553003: Validate incoming JS Message Headers: test message parser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed WebUIMojoTest.EndToEndPing Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « mojo/public/js/bindings/constants.cc ('k') | mojo/public/js/bindings/tests/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 define([ 5 define([
6 "gin/test/expect", 6 "gin/test/expect",
7 "mojo/public/js/bindings/core", 7 "mojo/public/js/bindings/core",
8 "gc", 8 "gc",
9 ], function(expect, core, gc) { 9 ], function(expect, core, gc) {
10 runWithMessagePipe(testNop); 10 runWithMessagePipe(testNop);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 expect(read.result).toBe(core.RESULT_OK); 110 expect(read.result).toBe(core.RESULT_OK);
111 expect(read.buffer.byteLength).toBe(42); 111 expect(read.buffer.byteLength).toBe(42);
112 112
113 var memory = new Uint8Array(read.buffer); 113 var memory = new Uint8Array(read.buffer);
114 for (var i = 0; i < memory.length; ++i) 114 for (var i = 0; i < memory.length; ++i)
115 expect(memory[i]).toBe((i * i) & 0xFF); 115 expect(memory[i]).toBe((i * i) & 0xFF);
116 } 116 }
117 117
118 }); 118 });
OLDNEW
« no previous file with comments | « mojo/public/js/bindings/constants.cc ('k') | mojo/public/js/bindings/tests/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698