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.
5 function check_overflow_check(value
) {
7 chrome
.windows
.create({ "left": value
}, function() { });
9 chrome
.test
.assertTrue(e
.message
.indexOf(
10 "Value must fit in a 32-bit signed integer.") != -1);
11 chrome
.test
.succeed();
15 chrome
.test
.runTests([
16 function overflow2To31() { check_overflow_check(0x80000000); },
17 function overflowMinus2To31Minus1() { check_overflow_check(-0x80000001); },
18 function overflow2To32() { check_overflow_check(0x100000000); },