Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / test / data / translate / pseudo_main.js
index cab4309..baaca8d 100644 (file)
@@ -3,6 +3,8 @@
 // found in the LICENSE file.
 
 div_log = function (message) {
+  // console.log() does not work inside the isolated world.
+  // Add DOM elements to show error messages.
   var div = document.getElementById('log');
   var element = document.createElement('pre');
   element.innerText = message;
@@ -11,8 +13,8 @@ div_log = function (message) {
 if (typeof world != 'undefined') {
   div_log('v8 isolation doesn\'t work');
   document.title = 'FAIL';
-  return;
+} else {
+  div_log('The first script pseudo_main.js is loaded');
+  div_log('Loading the second script pseudo_element_main.js ...');
+  cr.googleTranslate.onLoadJavascript(element_main_script_url);
 }
-div_log('The first script pseudo_main.js is loaded');
-div_log('Loading the second script pseudo_element_main.js ...');
-cr.googleTranslate.onLoadJavascript(element_main_script_url);