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

Unified Diff: third_party/protobuf/js/commonjs/import_test.js

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 7 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
« no previous file with comments | « third_party/protobuf/js/commonjs/export_testdeps.js ('k') | third_party/protobuf/js/commonjs/jasmine.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/js/commonjs/import_test.js
diff --git a/third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto b/third_party/protobuf/js/commonjs/import_test.js
similarity index 64%
copy from third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto
copy to third_party/protobuf/js/commonjs/import_test.js
index ee9cc7bd49211d2bbfc33219f334cd57142983f4..ffa34fea61e33c055123c2b97c804a5f80181b27 100644
--- a/third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto
+++ b/third_party/protobuf/js/commonjs/import_test.js
@@ -1,5 +1,5 @@
// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
+// Copyright 2016 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
@@ -28,40 +28,25 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Author: kenton@google.com (Kenton Varda)
-// Based on original Protocol Buffers design by
-// Sanjay Ghemawat, Jeff Dean, and others.
-//
-// A proto file which uses optimize_for = CODE_SIZE.
-
-syntax = "proto2";
-import "google/protobuf/unittest.proto";
-
-package protobuf_unittest;
-
-option optimize_for = CODE_SIZE;
+// Test suite is written using Jasmine -- see http://jasmine.github.io/
-message TestOptimizedForSize {
- optional int32 i = 1;
- optional ForeignMessage msg = 19;
- extensions 1000 to max;
- extend TestOptimizedForSize {
- optional int32 test_extension = 1234;
- optional TestRequiredOptimizedForSize test_extension2 = 1235;
- }
+var googleProtobuf = require('google-protobuf');
+var asserts = require('closure_asserts_commonjs');
+var global = Function('return this')();
- oneof foo {
- int32 integer_field = 2;
- string string_field = 3;
- }
-}
+// Bring asserts into the global namespace.
+googleProtobuf.object.extend(global, asserts);
+googleProtobuf.exportSymbol('jspb.Message', googleProtobuf.Message, global);
-message TestRequiredOptimizedForSize {
- required int32 x = 1;
-}
+var test7_pb = require('./test7/test7_pb');
+googleProtobuf.exportSymbol('proto.jspb.test.framing.FramingMessage', test7_pb.FramingMessage, global);
-message TestOptionalOptimizedForSize {
- optional TestRequiredOptimizedForSize o = 1;
-}
+describe('Import test suite', function() {
+ it('testImportedMessage', function() {
+ var framing1 = new proto.jspb.test.framing.FramingMessage([]);
+ var framing2 = new proto.jspb.test.framing.FramingMessage([]);
+ assertObjectEquals(framing1.toObject(), framing2.toObject());
+ });
+});
« no previous file with comments | « third_party/protobuf/js/commonjs/export_testdeps.js ('k') | third_party/protobuf/js/commonjs/jasmine.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698