[VD] Get app forcereload flag in webapplication constructor 31/251131/1 accepted/tizen/unified/20210119.130300 submit/tizen/20210115.043955
authorliwei <wei90727.li@samsung.com>
Fri, 8 Jan 2021 09:52:11 +0000 (17:52 +0800)
committerliwei <wei90727.li@samsung.com>
Fri, 8 Jan 2021 09:54:45 +0000 (17:54 +0800)
For wrt autotest tc which check "force.loadDefaultURI" metadata,
get app forcereload flag(force.loadDefaultURI) in constructor,
otherwise it's hard to make a scenario by test script to check
this metadata.

Change-Id: I38ae46846687ab52a874d8dff22d62f581b9491f
Signed-off-by: liwei <wei90727.li@samsung.com>
wrt_app/src/web_application.ts [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 25a2441..dee5636
@@ -27,6 +27,7 @@ export class WebApplication {
   backgroundExecution: boolean;
   defaultBackgroundColor: string;
   defaultTransparent: boolean;
+  isAlwaysReload: boolean;
   mainWindow: Electron.BrowserWindow;
   multitaskingSupport: boolean;
   notificationPermissionMap?: Map<Electron.WebContents, boolean>;
@@ -60,6 +61,7 @@ export class WebApplication {
       this.backgroundExecution = false;
     }
     this.accessiblePath = wrt.tv?.getAccessiblePath();
+    this.isAlwaysReload = (wrt.tv ? wrt.tv.isAlwaysReload() : false);
     this.multitaskingSupport = (wrt.tv ? wrt.tv.getMultitaskingSupport() : true);
     this.defaultBackgroundColor = (wrt.tv ? '#0000' :
         ((wrt.getPlatformType() === "product_wearable") ? '#000' : '#FFF'));
@@ -458,8 +460,7 @@ Then you can get profile log from the initial loading.`;
   }
 
   private needReload(src: string) {
-    let isAlwaysReload = (wrt.tv ? wrt.tv.isAlwaysReload() : false);
-    if (isAlwaysReload) {
+    if (this.isAlwaysReload) {
       return true;
     }
     let reload = false;