Commit e372df5c authored by Adam Cozzette's avatar Adam Cozzette

Fixed failing JS tests

parent 7bb8584f
......@@ -12,6 +12,7 @@
goog.provide('jspb.ExportTestDeps');
goog.require('goog.crypt.base64');
goog.require('goog.testing.PropertyReplacer');
goog.require('jspb.arith.Int64');
goog.require('jspb.arith.UInt64');
goog.require('jspb.BinaryEncoder');
......
......@@ -79,7 +79,7 @@ jspb.debug.dump_ = function(thing) {
type == 'null' || type == 'undefined') {
return thing;
}
if (window.Uint8Array) {
if (typeof Uint8Array !== 'undefined') {
// Will fail on IE9, where Uint8Array doesn't exist.
if (message instanceof Uint8Array) {
return thing;
......
......@@ -77,7 +77,7 @@ describe('debugTest', function() {
});
it('testBytes', function() {
if (COMPILED || !window['Uint8Array']) {
if (COMPILED || typeof Uint8Array == 'undefined') {
return;
}
var message = new proto.jspb.test.TestAllTypes();
......
......@@ -1052,13 +1052,4 @@ describe('Message test suite', function() {
assertNan(message.getDefaultDoubleField());
});
it('testSerializePreservesEmptyNestedField', function() {
var message = new proto.jspb.test.OptionalFields();
message.setANestedMessage(new proto.jspb.test.OptionalFields.Nested());
message.addARepeatedMessage(new proto.jspb.test.OptionalFields.Nested());
message = proto.jspb.test.OptionalFields.deserialize(message.serialize());
assertNotNullNorUndefined(message.getANestedMessage());
assertEquals(1, message.getARepeatedMessageList().length);
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment