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

Unified Diff: test/mjsunit/debug-toggle-mirror-cache.js

Issue 307383002: Add option to disable MirrorCache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 6 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 | « src/mirror-debugger.js ('k') | tools/generate-runtime-tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-toggle-mirror-cache.js
diff --git a/test/mjsunit/es6/regress/regress-cr372788.js b/test/mjsunit/debug-toggle-mirror-cache.js
similarity index 78%
copy from test/mjsunit/es6/regress/regress-cr372788.js
copy to test/mjsunit/debug-toggle-mirror-cache.js
index 9b66a7e08b3737cf26b0dc52e87f4e69bddbf729..a44c11551e02125fe8cd54b693c5ac6dee545721 100644
--- a/test/mjsunit/es6/regress/regress-cr372788.js
+++ b/test/mjsunit/debug-toggle-mirror-cache.js
@@ -25,21 +25,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax
+// Flags: --expose-debug-as debug
-var x = 0;
-var y = 0;
+var handle1 = debug.MakeMirror(123).handle();
+assertEquals("number", debug.LookupMirror(handle1).type());
-var thenable = { then: function(f) { x++; f(); } };
+debug.ToggleMirrorCache(false);
+var handle2 = debug.MakeMirror(123).handle();
+assertEquals(undefined, handle2);
+assertThrows(function() { debug.LookupMirror(handle2) });
-for (var i = 0; i < 3; ++i) {
- Promise.resolve(thenable).then(function() { x++; y++; });
-}
-assertEquals(0, x);
-
-(function check() {
- Promise.resolve().chain(function() {
- // Delay check until all handlers have run.
- if (y < 3) check(); else assertEquals(6, x);
- }).catch(function(e) { %AbortJS("FAILURE: " + e) });
-})();
+debug.ToggleMirrorCache(true);
+var handle3 = debug.MakeMirror(123).handle();
+assertEquals("number", debug.LookupMirror(handle3).type());
« no previous file with comments | « src/mirror-debugger.js ('k') | tools/generate-runtime-tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698