File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
javascript/node/selenium-webdriver Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ class StorageKeyPartitionDescriptor extends PartitionDescriptor {
7171
7272 constructor ( ) {
7373 super ( Type . STORAGE_KEY )
74+ this . #map. set ( 'type' , Type . STORAGE_KEY )
7475 }
7576
7677 /**
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class Storage {
5555
5656 if (
5757 partition !== undefined &&
58- ! ( partition instanceof ( BrowsingContextPartitionDescriptor || StorageKeyPartitionDescriptor ) )
58+ ! ( partition instanceof BrowsingContextPartitionDescriptor || partition instanceof StorageKeyPartitionDescriptor )
5959 ) {
6060 throw new Error ( `Params must be an instance of PartitionDescriptor. Received:'${ partition } '` )
6161 }
@@ -118,7 +118,7 @@ class Storage {
118118
119119 if (
120120 partition !== undefined &&
121- ! ( partition instanceof ( BrowsingContextPartitionDescriptor || StorageKeyPartitionDescriptor ) )
121+ ! ( partition instanceof BrowsingContextPartitionDescriptor || partition instanceof StorageKeyPartitionDescriptor )
122122 ) {
123123 throw new Error ( `Params must be an instance of PartitionDescriptor. Received:'${ partition } '` )
124124 }
@@ -158,7 +158,7 @@ class Storage {
158158
159159 if (
160160 partition !== undefined &&
161- ! ( partition instanceof ( BrowsingContextPartitionDescriptor || StorageKeyPartitionDescriptor ) )
161+ ! ( partition instanceof BrowsingContextPartitionDescriptor || partition instanceof StorageKeyPartitionDescriptor )
162162 ) {
163163 throw new Error ( `Params must be an instance of PartitionDescriptor. Received:'${ partition } '` )
164164 }
Original file line number Diff line number Diff line change @@ -331,6 +331,15 @@ function sendIndex(request, response) {
331331 response . end ( data )
332332}
333333
334+ /**
335+ * Detects the hostname.
336+ * @return {string } The detected hostname or 'localhost' if not found.
337+ */
338+ function getHostName ( ) {
339+ const hostnameFromEnv = process . env . HOSTNAME
340+ return hostnameFromEnv ? hostnameFromEnv : 'localhost'
341+ }
342+
334343// PUBLIC application
335344
336345/**
@@ -372,6 +381,8 @@ exports.whereIs = function (filePath) {
372381 return server . url ( filePath )
373382}
374383
384+ exports . getHostName = getHostName ;
385+
375386exports . Pages = Pages
376387
377388if ( require . main === module ) {
You can’t perform that action at this time.
0 commit comments