From 7e1a24e205584a677a272369ee800eaee79fab77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Tue, 15 Sep 2015 18:26:09 +0200 Subject: [PATCH] FEATURE: ensure localStorage is disabled in smoke tests --- spec/phantom_js/smoke_test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/phantom_js/smoke_test.js b/spec/phantom_js/smoke_test.js index c41c488ea85..969205dc437 100644 --- a/spec/phantom_js/smoke_test.js +++ b/spec/phantom_js/smoke_test.js @@ -17,6 +17,14 @@ page.viewportSize = { height: 768 }; +// In the browser, when the cookies are disabled, it also disables the localStorage +// Here, we're mocking that behavior and making sure the application doesn't blow up +page.onInitialized = function() { + page.evaluate(function() { + localStorage["disableLocalStorage"] = true; + }) +} + // page.onConsoleMessage = function(msg) { // console.log(msg); // }