fix loading bar switch loading method issue
Merge pull request #7450 from andyque/fixLoadingBarTest

fix loading bar switch loading method issue